﻿<!DOCTYPE html>
<html class="detailsHtml" xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<title>安全警示室</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
        <link rel="icon" href="/frontEnd/images/favicon.ico">
		<link rel="stylesheet" type="text/css" href="/frontEnd/css/style.css" />
	</head>
    <body>
   <!-- <div class="boxCenter">
        <h1 class="title" style="border-bottom: 0;"><a href="javascript:history.back(-1);"><img src="/frontEnd/images/return.png"/></a> </h1>
        <div class="boxCenter box">
            <h1 class="title" id="dataList1"></h1>
            <div id="rollBox2">
                <div id="roll3">
            <ul id="dataList" style="height: 600px">
                <li><a href="javascript"><span></span></a></li>
            </ul>
            <ul class="dataList" id="dataList2"></ul>
                </div>
            </div>
        </div>
    </div>-->
   <div class="boxCenter">
       <h1 class="title" style="border-bottom: 0;"><a href="javascript:history.back(-1);"><img src="/frontEnd/images/return.png"/></a> </h1>
       <div class="boxCenter box">
           <h1 class="title" id="caseTitle"></h1>
           <div id="rollBox2">
               <div id="roll3">
                   <ul class="dataList" id="dataList1"></ul>
                   <ul class="dataList" id="dataList2"></ul>
               </div>
           </div>
       </div>
   </div>
    <script src="/frontEnd/js/jquery-2.1.4.min.js" type="text/javascript" charset="utf-8"></script>
    </body>
    <script th:inline="javascript">
        Date.prototype.Format = function (fmt) { //author: meizz
            var o = {
                "M+": this.getMonth() + 1, //月份
                "d+": this.getDate(), //日
                "H+": this.getHours(), //小时
                "m+": this.getMinutes(), //分
                "s+": this.getSeconds(), //秒
                "q+": Math.floor((this.getMonth() + 3) / 3), //季度
                "S": this.getMilliseconds() //毫秒
            };
            if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
            for (var k in o)
                if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
            return fmt;
        }
        var list = [[${caseManagements}]]
        var dom=$("#dataList1");
        var html='';
        $.each(list,function(index,item){
            var nowTime=new Date(item.createDate);
            var time = nowTime.Format("yyyy-MM-dd HH:mm:ss");
            var index1 = index+1;
            html+='<li><a href="/yanAnDepot/details/'+item.id+'">'+"("+index1+") "+item.caseTitle+'<span>'+time+'</span></a></li>'
        });
        $(dom).append(html);
        var typename = [[${safetyTypeName}]]
        var caseTitle = "【"+typename+"】案例汇编列表";
        $('#caseTitle').html(caseTitle).attr("class","title");

    </script>
    <script type="text/javascript">
        /*文字滚动*/
        var area1 = document.getElementById('rollBox2');
        var con1 = document.getElementById('dataList1');
        var con2 = document.getElementById('dataList2');
        var speed = 50;
        area1.scrollTop = 0;

        if(con1.offsetHeight>=area1.offsetHeight){
            con2.innerHTML = con1.innerHTML;
        }
        function scrollUp() {
            if(area1.scrollTop >= con1.offsetHeight) {
                area1.scrollTop = 0;
            } else {
                area1.scrollTop++; //向上滚动
            }
        }
        var myScroll = setInterval("scrollUp()", speed);
        area1.onmouseover = function() {
            clearInterval(myScroll);
            $("#rollBox2").css("overflow","auto");
        }
        area1.onmouseout = function() {
            clearInterval(myScroll);
            myScroll = setInterval("scrollUp()", speed);
            $("#rollBox2").css("overflow","hidden");
        }
    </script>
</html>